{template header}
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>
<div class="container-fluid">
  <div class="row-fluid">
    <div class="span12">
    <a class="btn btn-large btn-link" type="button" href="index.php?c=admin&a=activityList">活动列表</a>
    </div>
  </div>
</div>
<div class="container-fluid">
  <form enctype="multipart/form-data" method="post" action="index.php?c=admin&a=activityEdit" class="form-horizontal">
      <div class="control-group">
        <label class="control-label">活动标题：</label>
        <div class="controls">
           <input class="input-xxlarge" type="text" name='title' placeholder="请输入活动标题" value="{$activity['title']}">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">是否对用户可见：</label>
        <div class="controls">
          <select name="is_show" class="input-mini">
            <option {if $activity['is_show'] == 1} selected="selected" {/if} value="1">是</option>
            <option {if $activity['is_show'] == 0} selected="selected" {/if} value="0">否</option>
          </select>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">活动链接：</label>
        <div class="controls">
           <input class="input-xxlarge" type="text" name='link' placeholder="请输入活动链接" value="{$activity['link']}">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">首页缩略图：</label>
        <div class="controls">
          {if $activity['thumb_img']}
            <img style="max-height:200px;" src="{$activity['thumb_img']}" alt="活动图">
          {/if}
          <input type="file" name="thumb_imgNew" value="$activity['thumb_img']">
          <input type="hidden" name="thumb_img" value="$activity['thumb_img']">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">活动图：</label>
        <div class="controls">
          {if $activity['img']}
            <img style="max-height:200px;" src="{$activity['img']}" alt="活动图">
          {/if}
          <input type="file" name="imgNew" value="$activity['img']">
          <input type="hidden" name="img" value="$activity['img']">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">开始时间：</label>
        <div class="controls">
        <input type="text" name="start_time" id="start_time_id" value="{eval echo date('Y-m-d H:i:s', $activity['start_time'])}">
          <input type="button" id="start_time_btn" onclick="return showCalendar('start_time_id', '%Y-%m-%d %H:%M:%S', '24', false, 'start_time_btn');" value="选择" class="button" id="start_time_id"/>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">结束时间：</label>
        <div class="controls">
        <input type="text" name="end_time" id="end_time_id" value="{eval echo date('Y-m-d H:i:s', $activity['end_time'])}">
          <input type="button" id="end_time_btn" onclick="return showCalendar('end_time_id', '%Y-%m-%d %H:%M:%S', '24', false, 'end_time_btn');" value="选择" class="button" id="end_time_id"/>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">加成人数</label>
        <div class="controls">
           <input class="input" type="text" name='joins' placeholder="真实参与人数" value="{$activity['joins']}">
        </div>
      </div>
      <div class="control-group">
        <div class="controls">
            <input type="hidden" name="action" value="{$action}">
            <input type="hidden" name="act_id" value="{$activity['act_id']}">
            <button type="submit" class="btn">提交</button>
        </div>
      </div>
  </form>
</div>
{template footer}